﻿<UserControl x:Class="WowModelExplorer.Controls.Settings.VideoSetting"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:st="clr-namespace:WowModelExplorer.Controls.Settings"
             d:DesignHeight="300"
             d:DesignWidth="400"
             mc:Ignorable="d">
    <Grid Name="_mainGrid">
        <Grid.Resources>
            <!--显示-->
            <st:DisplayModes x:Key="_displayModes" />
            <st:Resolutions x:Key="_resolutions" />
            <st:RefreshRates x:Key="_refreshrates" />
            <st:VideoDevices x:Key="_videoDevices" />
            <st:MultiSamples x:Key="_multisamples" />
            <st:OptionBools x:Key="_vsyncs" />
            <!--图形-->
            <st:OptionLevels x:Key="_matResolutions" />
            <st:TextureFilters x:Key="_matTextureFilters" />
            <st:OptionBools x:Key="_matProjections" />
            <!--环境-->
            <st:OptionLevels x:Key="_viewDistances"/>
            <st:OptionLevels x:Key="_envDetails" />
            <st:OptionLevels x:Key="_groundScenes" />
            <!--效果-->
            <st:OptionLevels x:Key="_shadowQuality" />
            <st:OptionLevels x:Key="_liquidDetail" />
            <st:OptionLevels x:Key="_sunLightEffect" />
            <st:OptionLevels x:Key="_particleDensity" />
            <st:OptionLevels x:Key="_ssao"/>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="0.1*" />
            <RowDefinition Height="0.2*" />
            <RowDefinition Height="0.1*" />
            <RowDefinition Height="0.25*" />
            <RowDefinition Height="0.25*" />
            <RowDefinition Height="0.1*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <StackPanel Grid.Row="0"
                    Grid.ColumnSpan="2"
                    Orientation="Vertical">
            <Label Margin="5,0,0,0" Content="{DynamicResource display}"/>
            <Separator />
        </StackPanel>
        <Grid Grid.Row="1" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.8*" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center"
                   Content="{DynamicResource displayMode}" />
            <ComboBox Name="_cbDisplayModes"
                      Grid.Row="0"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _displayModes}}">
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource displayMode}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource displayModeDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="1"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource resolution}"/>
            <ComboBox Name="_cbResolutions"
                      Grid.Row="1"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _resolutions}}">
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource resolution}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource resolutionDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="2"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource refreshRate}"/>
            <ComboBox Name="_cbRefreshRates"
                      Grid.Row="2"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _refreshrates}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource refreshRate}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource refreshRateDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.8*" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center"
                   Content="{DynamicResource monitor}"/>
            <ComboBox Name="_cbVideoDevices"
                      Grid.Row="0"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      ItemsSource="{Binding Source={StaticResource _videoDevices}}">
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource monitor}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource monitorDescription}" />
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="1"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource multisample}"/>
            <ComboBox Name="_cbMultisamples"
                      Grid.Row="1"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      ItemsSource="{Binding Source={StaticResource _multisamples}}">
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource multisample}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource multisampleDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="2"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource vsync}"/>
            <ComboBox Name="_cbVsyncs" Grid.Row="2"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True" 
                      ItemsSource="{Binding Source={StaticResource _vsyncs}}">
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource vsync}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource vsyncDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
        </Grid>
        <StackPanel Grid.Row="2"
                    Grid.ColumnSpan="2"
                    Orientation="Vertical">
            <Label Margin="5,0,0,0" Content="{DynamicResource graphics}"/>
            <Separator />
        </StackPanel>
        <Grid Margin="5,0,5,0" Grid.Row="3" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.8*" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Row="0"
                    Grid.ColumnSpan="2"
                    Orientation="Vertical">
                <Label Margin="5,0,5,0" Content="{DynamicResource material}"/>
                <Separator />
            </StackPanel>
            <Label Grid.Row="1"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource materialResolution}"/>
            <ComboBox Name="_cbMatResolutions"
                      Grid.Row="1"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _matResolutions}}">
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource materialResolution}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource materialResolutionDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="2"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource textureFilter}"/>
            <ComboBox Name="_cbMatTextureFilters"
                      Grid.Row="2"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _matTextureFilters}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource textureFilter}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource textureFilterDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="3"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource materialProjection}"/>
            <ComboBox Name="_cbMatProjections"
                      Grid.Row="3"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _matProjections}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource materialProjection}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource materialProjectionDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
        </Grid>
        <Grid Margin="5,0,5,0" Grid.Row="4" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.8*" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Row="0"
                    Grid.ColumnSpan="2"
                    Orientation="Vertical">
                <Label Margin="5,0,5,0" Content="{DynamicResource environment}"/>
                <Separator />
            </StackPanel>
            <Label Grid.Row="1"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource viewDistance}"/>
            <ComboBox Name="_cbViewDistances"
                      Grid.Row="1"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _viewDistances}}">
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource viewDistance}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource viewDistanceDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="2"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource environmentDetail}"/>
            <ComboBox Name="_cbEnvDetails"
                      Grid.Row="2"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _envDetails}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource environmentDetail}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource environmentDetailDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="3"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource groundScene}"/>
            <ComboBox Name="_cbGroundScenes"
                      Grid.Row="3"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _groundScenes}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource groundScene}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource groundSceneDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
        </Grid>
        <Grid Margin="5,0,5,0" Grid.Row="3" Grid.Column="1" Grid.RowSpan="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
                <RowDefinition Height="24" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.8*" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Row="0"
                    Grid.ColumnSpan="2"
                    Orientation="Vertical">
                <Label Margin="5,0,5,0" Content="{DynamicResource effect}"/>
                <Separator />
            </StackPanel>
            <Label Grid.Row="1"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource shadowQuality}"/>
            <ComboBox Name="_cbShadowQuality"
                      Grid.Row="1"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _shadowQuality}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource shadowQuality}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource shadowQualityDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="2"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource liquidDetail}"/>
            <ComboBox Name="_cbLiquidDetail"
                      Grid.Row="2"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _liquidDetail}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource liquidDetail}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource liquidDetailDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="3"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource sunEffect}"/>
            <ComboBox Name="_cbSunLightEffect"
                      Grid.Row="3"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _sunLightEffect}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource sunEffect}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource sunEffectDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="4"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource particleDensity}"/>
            <ComboBox Name="_cbParticleDensity"
                      Grid.Row="4"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _particleDensity}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource particleDensity}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource particleDensityDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
            <Label Grid.Row="5"
                   Margin="0,0,5,0"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Center" Content="{DynamicResource ssao}"/>
            <ComboBox Name="_cbSSAO"
                      Grid.Row="5"
                      Grid.Column="1"
                      Margin="0,2,10,2"
                      HorizontalContentAlignment="Right"
                      IsReadOnly="True"
                      ItemsSource="{Binding Source={StaticResource _ssao}}" >
                <ComboBox.ToolTip>
                    <StackPanel Width="150">
                        <TextBlock TextWrapping ="Wrap" Text="{DynamicResource ssao}"/>
                        <TextBlock TextWrapping="Wrap" Text="{DynamicResource ssaoDescription}"/>
                    </StackPanel>
                </ComboBox.ToolTip>
            </ComboBox>
        </Grid>
        <StackPanel Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2"
                    Margin="0,0,20,0"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Orientation="Horizontal">
            <Button Name="_btApply"
                    Width="75"
                    Height="23"
                    Margin="0,0,4,0"
                    IsEnabled="False"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Content="{DynamicResource apply}" />
        </StackPanel>
    </Grid>
</UserControl>
